<template>
	<div>
		<header-container>
			<!-- 自定义头部 -->
			<m-header
				v-for="(item, index) in pageTree.header[type.Header]" 
				:key="index" 
				v-sdrag:real="{id: item.id, com: item.id, dragable: 0, type: type.Header}">
			</m-header>
		</header-container>
	</div>
</template>
<script>
	import Header from "./Header";
	import ContentContainer from "../../real-components/ContentContainer";
	import HeaderContainer from "../../real-components/HeaderContainer";
	import FooterContainer from "../../real-components/FooterContainer";
	import {getPageNameOrVirtualPageName} from "../../utils/getPageName";
	import {getPageTree, initDomTree} from "../../utils/getPageTree";
	export default {
		data() {
			return {
				type: {
					Header: "Header",
				},
			}
		},
		computed: {
			pageName() {
				return getPageNameOrVirtualPageName();
			},
			pageTree() {
				return getPageTree(this, this.pageName);
			}
		},
		methods: {

		},
		components: {
			"m-header": Header,
			"header-container": HeaderContainer,
			"content-container": ContentContainer,
			"footer-container": FooterContainer,
		},
		filters: {

		},
		created() {

		},
		mounted () {
			initDomTree(this.$store.getters.getDomTree[this.pageName]);
		},
		updated() {
			//页面更新完毕
			// console.log("页面更新完毕");
			initDomTree(this.$store.getters.getDomTree[this.pageName]);
		},

	}
</script>
<style scoped>

</style>

